package com.linghu.study.springbootshirojwtdemo.bean;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;

/**
 * @author: linghu
 * @date:
 * @version: 1.0.0
 * @description: 用户实体
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class User {
    int id;
    @NotBlank(message = "用户名不能为空")
    String userName;
    @NotBlank(message = "密码不能为空")
    String password;
    int roleId;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public int getRoleId() {
        return roleId;
    }

    public void setRoleId(int roleId) {
        this.roleId = roleId;
    }
}
